From: Georges Basile Stavracas Neto Date: Fri, 26 Jun 2020 18:54:32 +0000 (-0300) Subject: Replace anchor point by translation and pivot point X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~202 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0717f76362179a29a037078e7f8e02da5095e718;p=gnome-shell.git Replace anchor point by translation and pivot point Anchor point is deprecated and will eventually be removed from Mutter's Clutter. Replace them by a combination of pivot point and translation. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1334 --- diff --git a/js/ui/layout.js b/js/ui/layout.js index 9013aa97b..4cd066582 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -1204,7 +1204,8 @@ class HotCorner extends Clutter.Actor { if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) { this._corner.set_position(this.width - this._corner.width, 0); - this.set_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST); + this.set_pivot_point(1.0, 0.0); + this.translation_x = -this.width; } else { this._corner.set_position(0, 0); } diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index 692cb1022..eae7bf464 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -489,7 +489,10 @@ var Magnifier = class Magnifier { _updateMouseSprite() { this._updateSpriteTexture(); let [xHot, yHot] = this._cursorTracker.get_hot(); - this._mouseSprite.set_anchor_point(xHot, yHot); + this._mouseSprite.set({ + translation_x: -xHot, + translation_y: -yHot, + }); } _updateSpriteTexture() { diff --git a/js/ui/panel.js b/js/ui/panel.js index 8f7dc95c0..90aea8dad 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -675,7 +675,7 @@ class PanelCorner extends St.DrawingArea { let borderWidth = node.get_length('-panel-corner-border-width'); this.set_size(cornerRadius, borderWidth + cornerRadius); - this.set_anchor_point(0, borderWidth); + this.translation_y = -borderWidth; } });